Skip to content

0033895: fix null surface crash in fixshape#622

Closed
sander-adamson-cloudnc wants to merge 1 commit into
Open-Cascade-SAS:IRfrom
sander-adamson-cloudnc:CR33895-fixshape-null-surface-crash
Closed

0033895: fix null surface crash in fixshape#622
sander-adamson-cloudnc wants to merge 1 commit into
Open-Cascade-SAS:IRfrom
sander-adamson-cloudnc:CR33895-fixshape-null-surface-crash

Conversation

@sander-adamson-cloudnc

Copy link
Copy Markdown
Contributor

ShapeFix_Shape crashes with a segfault when given a shape that contains faces without a surface pointer, for example if the shape is tessellated or triangulated, or contains tessellated / triangulated subshapes.

I added null checks to the const Handle(Geom_Surface)& parameter of the ShapeAnalysis_Surface constructor, and to the analogous parameter of the Init method, in each case throwing a Standard_NullObject exception.

Now, ShapeFix_Shape::Perform will throw an exception instead of crashing with a segfault whenever it encounters a face without a surface.

I have CLA 1124.

ShapeFix_Shape crashes with a segfault when given a shape that contains
faces without a surface pointer, for example if the shape is tessellated
or triangulated, or contains tessellated / triangulated subshapes.

I added null checks to the `const Handle(Geom_Surface)&` parameter of
the ShapeAnalysis_Surface constructor, and to the analogous parameter
of the Init method, in each case throwing a Standard_NullObject exception.

Now, ShapeFix_Shape::Perform will throw an exception instead of crashing
with a segfault whenever it encounters a face without a surface.

I have CLA 1124.
@dpasukhi dpasukhi changed the base branch from master to IR July 18, 2025 12:32
@dpasukhi dpasukhi requested review from Copilot and dpasukhi and removed request for Copilot July 18, 2025 12:32
@dpasukhi dpasukhi added the 3. CLA approved User has the signed CLA and ready to review or integration processes label Jul 18, 2025
@dpasukhi

Copy link
Copy Markdown
Member

Dear @sander-adamson-cloudnc I see 2 similar PR, which you want to keep?

@github-project-automation github-project-automation Bot moved this from Todo to Closed in Maintenance Jul 18, 2025
@dpasukhi dpasukhi added 2. Bug Something isn't working 1. Shape Healing Shape healing operation (fixing topology issue with BRep data) labels Jul 18, 2025
@dpasukhi dpasukhi added this to the Release 7.9.2 milestone Jul 18, 2025
@sander-adamson-cloudnc

Copy link
Copy Markdown
Contributor Author

I will make a better PR -- I sent these by accident

@sander-adamson-cloudnc

Copy link
Copy Markdown
Contributor Author

Is there a particular IR branch I should be targeting the PRs to, or is master OK?

@sander-adamson-cloudnc sander-adamson-cloudnc deleted the CR33895-fixshape-null-surface-crash branch July 18, 2025 12:53
@sander-adamson-cloudnc sander-adamson-cloudnc restored the CR33895-fixshape-null-surface-crash branch July 18, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Shape Healing Shape healing operation (fixing topology issue with BRep data) 2. Bug Something isn't working 3. CLA approved User has the signed CLA and ready to review or integration processes

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants